package com.shsun.curveservice.controller.front;

import com.shsun.curveapi.domain.dto.AddCurveDTO;
import com.shsun.curveservice.logic.service.CurveMgrService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Tag(name = "遗忘曲线管理")
@RequestMapping("/curve/mgr/")
public class CurveController {

    @Resource
    private CurveMgrService curveMgrService;

    @PostMapping("add")
    @Operation(summary = "遗忘曲线添加")
    public void add(@RequestBody @Valid AddCurveDTO addCurveDTO) {
        curveMgrService.add(addCurveDTO);
    }
}
